import { Link, Outlet, useMatch, Navigate } from "react-router-dom"
const Discover = () => {
    let match = useMatch('/discover/playlist')
    // console.log(match)
    //v6的版本中没有redirect这个api了,取而代之的是Navigate
    return (
        <fieldset>
            <legend>发现</legend>
            <h1>发现</h1>
            <Link to="/discover/toplist">排行榜</Link>
            <br />
            <Link to="/discover/playlist">歌单</Link>
    
            <Outlet></Outlet>
        </fieldset>
    )
}

export default Discover